1"use client"; 2 3import { useParams } from "next/navigation"; 4import { PageCanvas } from "@/components/editor/page-canvas"; 5 6/** 7 * /w/:workspace/page/:id — the page canvas. The [id] layout has already 8 * loaded page + blocks and opened the realtime channel; PageCanvas branches: 9 * a database page (page.databaseId set) renders the full DatabasePageView, a 10 * plain page renders PageView (the block editor). 11 */ 12export default function PageIndexPage() { 13 const params = useParams<{ id: string }>(); 14 const pageId = params?.id ?? ""; 15 16 if (!pageId) return null; 17 return <PageCanvas pageId={pageId} />; 18} 19